<?php
/**
 * Companies Infos
 * JSON output of company information
 *
 * @author Xavier VILAIN
 * @package \Shama\Company
 * @license
 */

use Shama\Company;
$id = Xview::instance()->val('id');
try {
	$company = \Fox\Dao::load(Company::className(),$id);
	$data = $company->getData();
	$output['companyid'] = $data['companyid'];
	$output['company'] = $data['name1'];
}
catch (Fox\Object\Exception\NotExist $e)
{
	$output = array();
}
echo Fox\Utilities::jsonUTF8Encode($output);